import Vue from 'vue'
import Vuex from 'vuex'

import axios from 'axios'

Vue.use(Vuex)

const key = 'user'
const store = new Vuex.Store({
	//定义状态
//	state: {
//		user: ''
//	},
//	getters: {
//		getStorage: function(state){
//			if(!state.user){
//				state.user = JSON.parse(localStorage.getItem(key))
//			}
//			return state.user
//		}
//	},
//	mutations: {
//		$_setStorage(state,value){
//			state.user = value;
//			localStorage.setItem(key, JSON.stringify(value))
//		},
//		$_removeStorage(state){
//			state.user = '';
//			localStorage.removeItem(key)
//		}
//	}
})

export default store
